-
Notifications
You must be signed in to change notification settings - Fork 61
Fix cargo-gpu in build script failing when called by Miri or Clippy #335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Please look at Rust-GPU/cargo-gpu#101 for additional context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR! 🍻
Looks good, just one small thing.
// overwritten by spirv-builder anyway | ||
cargo.env_remove("CARGO_ENCODED_RUSTFLAGS"); | ||
|
||
cargo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These seem to be added with no comment, and RUSTC_WRAPPER
is both here and above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just removed duplicates from removed env vars and tried to add relevant comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh my bad, thanks for fixing it
cargo-gpu Rust-GPU/cargo-gpu#101
@Firestar99: I've added a new
CargoCmd
struct that should handle all env vars in one central place for both spirv-builder and cargo-gpu install. In case of a failure, it alsodebug!
logs the env vars which were removed and which were inherited with their values, to make debugging these sort of issues easier in the future.As stated in Rust-GPU/cargo-gpu#93, build script which uses
rustc_codegen_spirv
viacargo-gpu
failed to build shader crate while using Miri.This pull request fixes this issue by removing
RUSTC_WRAPPER
environment variable fromcargo
call.